<?php
namespace app\common\model;
use think\Db;
/**
 * 聚能服务联系信息模型
 */
class ServiceAddress extends Base {
	/**
	 * 获取列表
	 */
	public function listQuery(){
		$where[] = ['dataFlag','=',1];
		$where[] = ['shopId','=',(int)session('ZHT_USER.shopId')];
		$rs = $this->order('isDefault desc, addressId desc')->where($where)->select();
		foreach ($rs as $key => $v) {
			$rs[$key]['areaNames'] = model('area')->getAreaNames($v['areaIdPath']);
		}
		return $rs;
	}
	
}